package com.kyin.satoken.client;


import com.dtflys.forest.annotation.*;

import java.util.Map;

/**
 * @author kyin
 * @ClassName HttpForestClient
 * @description: 类描述
 * @date 2025/5/27 11:12
 * @version: 1.0
 */
@BaseRequest(
        baseURL = "${baseURL}",
        charset = "UTF-8",
        contentType = "application/json"
)
public interface HttpForestClient {

    // 获取access_token
    @Get("/cgi-bin/token?grant_type=client_credential&appid=${appid}&secret=${secret}")
    Map<String,Object> getAccessToken();

    // 获取手机号
    @Post("/wxa/business/getuserphonenumber?access_token={accessToken}")
    Map<String,Object> getPhoneNumber(@Var("accessToken") String accessToken,@JSONBody Map<String,Object> params);

    // 获取openid 信息
    @Get("/sns/jscode2session?appid=${appid}&secret=${secret}&js_code={jsCode}&grant_type=authorization_code")
    Map<String,Object> jsCode2session(@Var("jsCode") String jsCode);

}
